<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns="http://www.w3.org/1999/xhtml"
                template="/template.xhtml"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.org/ui">
    <ui:define name="content">
        <f:view>
            <h:form>
                <div class="inside">
                    <p:commandLink action="#{fAQBean.prepareInsert}" ajax="false"><h2>Add new FAQ</h2></p:commandLink>
                        <p:growl showDetail="true" showSummary="true"/>
                        <h:dataTable value="#{fAQBean.allFAQ}" var="item" style="width: 100%" >
                            <h:column>
                                 <ul class="articles">
                                     <li>
                                     
                                         <h4>#{item.question}</h4>
                                         <p> => <p:commandLink value="Detail" action="#{fAQBean.detailFAQs(item)}" ajax="false"/> |
                                             <p:commandLink value="Delete" actionListener="#{fAQBean.deleteFAQ}" ajax="false">
                                                 <f:setPropertyActionListener value="#{item}" target="#{fAQBean.faq}"/>
                                             </p:commandLink> 
                                           
                                         </p>
                                        
                                     </li>
                                 </ul>
                            </h:column>
                        </h:dataTable>
                    </div>
              
            </h:form>
        </f:view>                        
    </ui:define>
</ui:composition>
